{template header}

<div class="container">

<div class="row">


<div>
    <div class="panel panel-default">
        <div class="panel-body">

{template menu}

<div class="system">
<ul>
{loop $arrMessage $key $item}
<li>
<span style="color:#42b475;">{php echo date('Y-m-d H:i:s',$item[addtime])}</span>
<br />
{$item[content]}

    {if $item['tourl']}
    <a href="{$item['tourl']}">[点击查看]</a>
    {/if}

</li>
    <li style="text-align:right "><a class="btn btn-w"  href="javascript:void(0)" onclick="delmessage('{$item[messageid]}')">删除</a> </li>
{/loop}
</ul>
</div>


</div>
</div>
</div>


</div>

</div>
</div>
</div>

{template footer}
<script>
    //删除消息
    function delmessage(messageid){


        if (confirm('删除这条消息吗？')) {

            $.ajax({
                type: "POST",
                url: siteUrl+"index.php?app=message&ac=delmsg",
                data: "messageid="+messageid,
                beforeSend:function(){
                },
                success:function(result){
                    if(result == '1'){
                        window.location.reload();
                    }
                }
            });

        }
    }

</script>